const a = async function (
  _,
  _01,
  _02,
  { dc: { http, reload, message }, XLSX }
) {
  const data = await analyzExcel(XLSX);
  if (data.length && data.length > 7) {
    const list = data.slice(6);
    const keys = {
      a: "enterpriseName",
      b: "ys2023",
      c: "js2023",
      d: "ys2024",
      e: "zx2024",
      f: "zxl2024",
    };
    const imp3List = [];
    list.forEach((row) => {
      const addRow = {};
      Object.keys(keys).forEach((key) => {
        addRow[keys[key]] = row[key];
      });
      imp3List.push(addRow);
    });
    imp3List.forEach((i, index) => {
      i.sortNo = index + 1;
    });
    await http.post({
      url: "/ypxy/reportImport/reportImport3",
      data: {
        imp3List,
      },
    });
    message.success("导入成功");
    reload();
  }
};
